Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 1 - Introduction to QuickDraw GX / The QuickDraw GX Programming Environment


Handling Errors

In all but its printing component, QuickDraw GX uses a sophisticated, three-level system for reporting diagnostic messages. The execution of a function may result in the generation of an error, a warning, or a notice:

Errors, warnings, and notices are not returned as function results. Instead, they are posted, or stored by QuickDraw GX in locations accessible through function calls. To determine whether, for example, an error has occurred, your application makes a specific call (such as GXGetGraphicsError) that returns not only the most recent error but also the first error posted since the last time you called GXGetGraphicsError. For information about these function calls, see the debugging chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.

You can use the error-handling facilities of QuickDraw GX in the following ways:

Functions within the printing component of QuickDraw GX do not use this system for reporting diagnostics. Instead, most functions place errors directly into the job object involved. Some printing functions return a function result of type OSErr, that describes a Macintosh error code. For more information, see the core printing features chapter of Inside Macintosh: QuickDraw GX Printing.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996